<!DOCTYPE html>
<html lang="en">

	<head>
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta charset="utf-8" />
		<title>补考重修情况分析</title>

		<meta name="description" content="" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />

		<!-- bootstrap & fontawesome -->
		<link rel="stylesheet" href="/assets/css/bootstrap.min.css" />
		<link rel="stylesheet" href="/assets/font-awesome/4.5.0/css/font-awesome.min.css" />

		<!-- page specific plugin styles -->
		<link rel="stylesheet" href="/assets/css/jquery-ui.min.css" />

		<!-- text fonts -->
		<link rel="stylesheet" href="/assets/css/fonts.googleapis.com.css" />

		<!-- ace styles -->
		<link rel="stylesheet" href="/assets/css/ace.min.css" class="ace-main-stylesheet" id="main-ace-style" />

		<!--[if lte IE 9]>
			<link rel="stylesheet" href="/assets/css/ace-part2.min.css" class="ace-main-stylesheet" />
		<![endif]-->
		<link rel="stylesheet" href="/assets/css/ace-skins.min.css" />
		<link rel="stylesheet" href="/assets/css/ace-rtl.min.css" />

		<!--[if lte IE 9]>
		  <link rel="stylesheet" href="/assets/css/ace-ie.min.css" />
		<![endif]-->

		<!-- inline styles related to this page -->

		<!-- ace settings handler -->
		<script src="/assets/js/ace-extra.min.js"></script>

		<!-- HTML5shiv and Respond.js for IE8 to support HTML5 elements and media queries -->

		<!--[if lte IE 8]>
		<script src="/assets/js/html5shiv.min.js"></script>
		<script src="/assets/js/respond.min.js"></script>
		<![endif]-->
	</head>

	<body class="no-skin">
		<div id="navbar" class="navbar navbar-default          ace-save-state">
			<div class="navbar-container ace-save-state" id="navbar-container">
				<button type="button" class="navbar-toggle menu-toggler pull-left" id="menu-toggler" data-target="#sidebar">
					<span class="sr-only">Toggle sidebar</span>

					<span class="icon-bar"></span>

					<span class="icon-bar"></span>

					<span class="icon-bar"></span>
				</button>

				<div class="navbar-header pull-left">
					<a href="/views/index.html" class="navbar-brand">
						<small>
							<i class="fa fa-leaf"></i>
							学生发展数据综合评价与分析系统
						</small>
					</a>
				</div>

				<div class="navbar-buttons navbar-header pull-right" role="navigation">
					<ul class="nav ace-nav">

						<li class="light-blue dropdown-modal">
							<a data-toggle="dropdown" href="#" class="dropdown-toggle">

								<img class="nav-user-photo us_photo" src="/assets/images/avatars/blank.jpg" alt="个人头像" style="background-color:#fff" />

								<span class="user-info">
							       <span id="us_name"></span>
								</span>

								<i class="ace-icon fa fa-caret-down"></i>
							</a>

							<ul class="user-menu dropdown-menu-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">
								<li>
									<a id="setting" target="_blank">
										<i class="ace-icon fa fa-cog"></i> 设置
									</a>
								</li>

								<li>
									<a id="profile" target="_blank">
										<i class="ace-icon fa fa-user"></i> 个人信息
									</a>
								</li>

								<li class="divider"></li>

								<li>
									<a href="/login.html" onclick="logout()">
										<i class="ace-icon fa fa-power-off"></i> 注销
									</a>
								</li>
							</ul>
						</li>
					</ul>
				</div>
			</div>
			<!-- /.navbar-container -->
		</div>

		<div class="main-container ace-save-state" id="main-container">
			<script type="text/javascript">
				try {
					ace.settings.loadState('main-container')
				} catch(e) {}
			</script>

			<div id="sidebar" class="sidebar                  responsive                    ace-save-state">
				<script type="text/javascript">
					try {
						ace.settings.loadState('sidebar')
					} catch(e) {}
				</script>

				<div class="sidebar-shortcuts" id="sidebar-shortcuts">
					<div class="sidebar-shortcuts-large" id="sidebar-shortcuts-large">
						<button class="btn btn-success">
							<i class="ace-icon fa fa-signal"></i>
						</button>

						<button class="btn btn-info">
							<i class="ace-icon fa fa-pencil"></i>
						</button>

						<button class="btn btn-warning">
							<i class="ace-icon fa fa-users"></i>
						</button>

						<button class="btn btn-danger">
							<i class="ace-icon fa fa-cogs"></i>
						</button>
					</div>

					<div class="sidebar-shortcuts-mini" id="sidebar-shortcuts-mini">
						<span class="btn btn-success"></span>

						<span class="btn btn-info"></span>

						<span class="btn btn-warning"></span>

						<span class="btn btn-danger"></span>
					</div>
				</div>
				<!-- /.sidebar-shortcuts -->

				<ul class="nav nav-list">
					<li class="">
						<a href="/views/index.html">
							<i class="menu-icon fa fa-tachometer"></i>
							<span class="menu-text"> 我的首页 </span>
						</a>

						<b class="arrow"></b>
					</li>

					<li class="">
						<a href="#" class="dropdown-toggle">
							<i class="menu-icon fa fa-tasks"></i>
							<span class="menu-text"> 数据管理 </span>

							<b class="arrow fa fa-angle-down"></b>
						</a>

						<b class="arrow"></b>

						<ul class="submenu">

							<li class="">
								<a href="/views/dataManage/studentManage.html">
									<i class="menu-icon fa fa-caret-right"></i> 学生
								</a>

								<b class="arrow"></b>
							</li>
							<li class="">
								<a href="/views/dataManage/teacherManage.html">
									<i class="menu-icon fa fa-caret-right"></i> 教师
								</a>

								<b class="arrow"></b>
							</li>
							<li class="">
								<a href="/views/dataManage/majorManage.html">
									<i class="menu-icon fa fa-caret-right"></i> 专业
								</a>

								<b class="arrow"></b>
							</li>
							<li class="">
								<a href="/views/dataManage/classroomManage.html">
									<i class="menu-icon fa fa-caret-right"></i> 班级
								</a>

								<b class="arrow"></b>
							</li>
							<li class="">
								<a href="/views/dataManage/scoreManage.html">
									<i class="menu-icon fa fa-caret-right"></i> 成绩
								</a>

								<b class="arrow"></b>
							</li>
							<li class="">
								<a href="/views/dataManage/certificateManage.html">
									<i class="menu-icon fa fa-caret-right"></i> 证书
								</a>

								<b class="arrow"></b>
							</li>
							<li class="">
								<a href="/views/dataManage/competitionManage.html">
									<i class="menu-icon fa fa-caret-right"></i> 竞赛
								</a>

								<b class="arrow"></b>
							</li>
							<li class="">
								<a href="/views/dataManage/innovationTrainManage.html">
									<i class="menu-icon fa fa-caret-right"></i> 创新训练
								</a>

								<b class="arrow"></b>
							</li>
							<li class="">
								<a href="/views/dataManage/scholarshipManage.html">
									<i class="menu-icon fa fa-caret-right"></i> 奖学金
								</a>

								<b class="arrow"></b>
							</li>
							<li class="">
								<a href="/views/dataManage/excellentStudentManage.html">
									<i class="menu-icon fa fa-caret-right"></i> 优秀学生
								</a>

								<b class="arrow"></b>
							</li>
							<li class="">
								<a href="/views/dataManage/pushExcellentManage.html">
									<i class="menu-icon fa fa-caret-right"></i> 推优
								</a>

								<b class="arrow"></b>
							</li>
							<li class="">
								<a href="/views/dataManage/partyMemberManage.html">
									<i class="menu-icon fa fa-caret-right"></i> 入党
								</a>

								<b class="arrow"></b>
							</li>
							<li class="">
								<a href="/views/dataManage/postGraduateManage.html">
									<i class="menu-icon fa fa-caret-right"></i> 考研录取
								</a>

								<b class="arrow"></b>
							</li>
							<li class="">
								<a href="/views/dataManage/volunteerManage.html">
									<i class="menu-icon fa fa-caret-right"></i> 志愿服务
								</a>

								<b class="arrow"></b>
							</li>
							<li class="">
								<a href="/views/dataManage/dutyManage.html">
									<i class="menu-icon fa fa-caret-right"></i> 学生干部
								</a>

								<b class="arrow"></b>
							</li>
							<li class="">
								<a href="/views/dataManage/adviceManage.html">
									<i class="menu-icon fa fa-caret-right"></i> 发展建议
								</a>

								<b class="arrow"></b>
							</li>

						</ul>
					</li>

					<li class="active open">
						<a href="#" class="dropdown-toggle">
							<i class="menu-icon fa fa-bar-chart-o"></i>
							<span class="menu-text"> 数据分析 </span>

							<b class="arrow fa fa-angle-down"></b>
						</a>

						<b class="arrow"></b>

						<ul class="submenu">
							<li class="">
								<a href="#" class="dropdown-toggle">
									<i class="menu-icon fa fa-caret-right"></i> 个人情况分析
									<b class="arrow fa fa-angle-down"></b>
								</a>

								<b class="arrow"></b>

								<ul class="submenu">
									<li class="">
										<a href="/views/dataAnalysis/student/personalGrade.html">
											<i class="menu-icon fa fa-leaf green"></i>个人成绩查询
										</a>

										<b class="arrow"></b>
									</li>
									<li class="">
										<a href="/views/dataAnalysis/student/personalAllInfo.html">
											<i class="menu-icon fa fa-leaf green"></i>发展综合分析
										</a>

										<b class="arrow"></b>
									</li>

								</ul>
							</li>

							<li class="">
								<a href="/views/dataAnalysis/dorm/dormAtmosphere.html">
									<i class="menu-icon fa fa-caret-right"></i> 宿舍情况分析
								</a>

								<b class="arrow"></b>
							</li>

							<li class="">
								<a href="/views/dataAnalysis/classroom/classAtmosphere.html">
									<i class="menu-icon fa fa-caret-right"></i> 班级情况分析
								</a>

								<b class="arrow"></b>
							</li>

							<li class="active open">
								<a href="#" class="dropdown-toggle">
									<i class="menu-icon fa fa-caret-right"></i> 整体学业分析
									<b class="arrow fa fa-angle-down"></b>
								</a>

								<b class="arrow"></b>

								<ul class="submenu">
									<li class="">
										<a href="/views/dataAnalysis/all/allGrade.html">
											<i class="menu-icon fa fa-leaf green"></i>学分积欠情况分析
										</a>

										<b class="arrow"></b>
									</li>
									<li class="active">
										<a href="/views/dataAnalysis/all/make_up_rebuild.html">
											<i class="menu-icon fa fa-leaf green"></i>补考重修情况分析
										</a>

										<b class="arrow"></b>
									</li>

								</ul>
							</li>

						</ul>
					</li>

					<li class="">
						<a href="#" class="dropdown-toggle">
							<i class="menu-icon fa fa-book"></i>
							<span class="menu-text"> 数据预测 </span>

							<b class="arrow fa fa-angle-down"></b>
						</a>

						<b class="arrow"></b>

						<ul class="submenu">
							<li class="">
								<a href="/views/bigDataAnalysis/courseDependence.html">
									<i class="menu-icon fa fa-caret-right"></i> 课程通过预警
								</a>

								<b class="arrow"></b>
							</li>

							<li class="">
								<a href="/views/bigDataAnalysis/scorePosition.html">
									<i class="menu-icon fa fa-caret-right"></i> 成绩位置预测
								</a>

								<b class="arrow"></b>
							</li>

							<li class="">
								<a href="/views/bigDataAnalysis/postGraduate.html">
									<i class="menu-icon fa fa-caret-right"></i> 考研录取预测
								</a>

								<b class="arrow"></b>
							</li>

							<li class="">
								<a href="/views/bigDataAnalysis/partyMember.html">
									<i class="menu-icon fa fa-caret-right"></i> 入党情况预测
								</a>

								<b class="arrow"></b>
							</li>

						</ul>
					</li>

					<li class="">
						<a href="#" class="dropdown-toggle">
							<i class="menu-icon fa fa-folder-open-o"></i>
							<span class="menu-text"> 文件操作 </span>

							<b class="arrow fa fa-angle-down"></b>
						</a>

						<b class="arrow"></b>

						<ul class="submenu">
							<li class="">
								<a href="/views/file/fileUpload.html">
									<i class="menu-icon fa fa-caret-right"></i> 文件上传
								</a>

								<b class="arrow"></b>
							</li>
							<li class="">
								<a href="/views/file/fileDownload.html">
									<i class="menu-icon fa fa-caret-right"></i> 文件下载
								</a>

								<b class="arrow"></b>
							</li>

						</ul>
					</li>

				</ul>
				<!-- /.nav-list -->

				<div class="sidebar-toggle sidebar-collapse" id="sidebar-collapse">
					<i id="sidebar-toggle-icon" class="ace-icon fa fa-angle-double-left ace-save-state" data-icon1="ace-icon fa fa-angle-double-left" data-icon2="ace-icon fa fa-angle-double-right"></i>
				</div>
			</div>

			<div class="main-content">
				<div class="main-content-inner">
					<div class="breadcrumbs ace-save-state" id="breadcrumbs">
						<ul class="breadcrumb">
							<li>
								<i class="ace-icon fa fa-home home-icon"></i>
								<a href="/views/index.html">首页</a>
							</li>

							<li class="active">补考重修情况分析</li>
						</ul>
						<!-- /.breadcrumb -->

					</div>

					<div class="page-content">

						<div class="row">
							<div class="col-xs-12">
								<!-- PAGE CONTENT BEGINS -->
								<div class="row">
									<div class="col-sm-10">
										<h3 class="header blue lighter smaller">
											<i class="ace-icon fa fa-spinner"></i>
											整体学业分析
										</h3>
									</div>
								</div>
								<div class="row">
									<div class="col-sm-2">
										<center>
											<label for="start_year">选择开始学年: </label>
											<select name="start_year" id="start_year" style="width: 120px;margin-left: 5px;">
											</select>
										</center>
									</div>
									<div class="col-sm-2">
										<center>
											<label for="start_term">选择开始学期: </label>
											<select name="start_term" id="start_term" style="width: 120px;margin-left: 5px;">
												<option selected></option>
												<option value="1">1</option>
												<option value="2">2</option>
											</select>
										</center>
									</div>
									<div class="col-sm-2">
										<center>
											<label for="end_year">选择终止学年 : </label>

											<select name="end_year" id="end_year" style="width: 120px;margin-left: 5px;">
											</select>
										</center>
									</div>
									<div class="col-sm-2">
										<center>
											<label for="end_term">选择终止学期 : </label>

											<select name="end_term" id="end_term" style="width: 120px;margin-left: 5px;">
												<option selected></option>
												<option value="1">1</option>
												<option value="2">2</option>
											</select>
										</center>
									</div>

									<div class="col-sm-2">
										<center>
											<button id="query" class="btn btn-info btn-sm">
										<span class="ace-icon fa fa-search icon-on-right bigger-110"></span>
									&nbsp;查&nbsp;找&nbsp;
									  </button>
										</center>
									</div>
								</div>

								<div class="row">
									<div class="col-sm-10">
										<h3 class="header blue lighter smaller">
										</h3>
									</div>
								</div>

								<div class="row">
									<div class="col-sm-6">

										<div class="widget-box transparent">
											<div class="widget-header widget-header-flat">
												<h4 class="widget-title lighter">
													<i class="ace-icon fa fa-star orange"></i>
													历年补考人次
												</h4>

												<div class="widget-toolbar">
													<a href="#" data-action="collapse">
														<i class="ace-icon fa fa-chevron-up"></i>
													</a>
												</div>
											</div>

											<div class="widget-body">
												<div class="widget-main no-padding">
													<div id="ch_make_up" style="height: 380px;margin-top: 25px;"></div>
												</div>
												<!-- /.widget-main -->
											</div>
											<!-- /.widget-body -->
										</div>
										<!-- /.widget-box -->
									</div>
									<div class="col-sm-6">

										<div class="widget-box transparent">
											<div class="widget-header widget-header-flat">
												<h4 class="widget-title lighter">
													<i class="ace-icon fa fa-star orange"></i>
													历年重修人次
												</h4>

												<div class="widget-toolbar">
													<a href="#" data-action="collapse">
														<i class="ace-icon fa fa-chevron-up"></i>
													</a>
												</div>
											</div>

											<div class="widget-body">
												<div class="widget-main no-padding">

													<div id="ch_rebuild" style="height:380px;margin-top: 25px;"></div>
												</div>
												<!-- /.widget-main -->
											</div>
											<!-- /.widget-body -->
										</div>
										<!-- /.widget-box -->
									</div>

								</div>

							</div>

							<!-- ECharts单文件引入 -->
							<!-- 标签式单文件引入 -->
							<script src="http://echarts.baidu.com/build/dist/echarts-all.js"></script>
							<script src="/assets/js/jquery-2.1.4.min.js"></script>

							<!-- PAGE CONTENT ENDS -->

						</div>
						<!-- /.row -->
					</div>
					<!-- /.page-content -->
				</div>
			</div>
			<!-- /.main-content -->

			<div class="footer">
				<div class="footer-inner">
					<div class="footer-content">
						<span class="bigger-120">
							<span class="blue bolder" style="margin-right: 10px;">学生发展数据综合评价与分析系统</span> 苏州科技大学 &copy; 2018-2019
						</span>
					</div>
				</div>
			</div>

			<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
				<i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
			</a>
		</div>
		<!-- /.main-container -->

		<!-- basic scripts -->

		<!--[if !IE]> -->
		<script src="/assets/js/jquery-2.1.4.min.js"></script>
		<script src="/assets/js/jquery.form.js"></script>
		<script src="/assets/js/jquery.cookie.js"></script>
		<script src="/assets/js/sddb.util.js"></script>

		<!-- <![endif]-->

		<!--[if IE]>
<script src="/assets/js/jquery-1.11.3.min.js"></script>
<![endif]-->
		<script type="text/javascript">
			if('ontouchstart' in document.documentElement) document.write("<script src='/assets/js/jquery.mobile.custom.min.js'>" + "<" + "/script>");
		</script>
		<script src="/assets/js/bootstrap.min.js"></script>

		<!-- page specific plugin scripts -->
		<script src="/assets/js/jquery-ui.min.js"></script>
		<script src="/assets/js/jquery.ui.touch-punch.min.js"></script>

		<!-- ace scripts -->
		<script src="/assets/js/ace-elements.min.js"></script>
		<script src="/assets/js/ace.min.js"></script>

		<!-- inline scripts related to this page -->

		<!--选择年级与学期-->
		<script type="text/javascript">
			//获取系统时间
			var date = new Date();
			var year = date.getFullYear();
			var month = date.getMonth() + 1;

			//添加空选项
			var sel_start_year = document.getElementById("start_year");
			sel_start_year.options[0] = new Option("", "");

			var index_s = 1;
			for(var i = year - 4; i <= year - 1; i++) {
				var temp = i + "-" + (parseInt(i) + 1);
				sel_start_year.options[index_s++] = new Option(temp, temp);
			}

			//终止学年框
			$("#start_year").change(function() {
				//清空终止年级的值
				$("#end_year").empty();
				//清空终止学期
				$("#end_term").empty();
				//先得到开始学年选定的值
				var start_year_value = $("#start_year").val().split("-")[0];
				var sel_end_year = document.getElementById("end_year");
				sel_end_year.options[0] = new Option("", "");
				var index_e = 1;
				for(var i = start_year_value; i <= year - 1; i++) {
					var temp = i + "-" + (parseInt(i) + 1);
					sel_end_year.options[index_e++] = new Option(temp, temp);
				}

				//设定开始学期与结束学期的值

				//获取标签
				var sel_start_term = document.getElementById("start_term");

				$("#start_term").empty();
				sel_start_term.options[0] = new Option("", "");
				if((parseInt(start_year_value) + 1 == year)) {
					//开始学年为去年，则依据月份来定可选学期

					if(month >= 6) {
						//可以有第二个学期
						sel_start_term.options[1] = new Option(1, 1);
						sel_start_term.options[2] = new Option(2, 2);

					} else {
						//不可以有第二个学期
						sel_start_term.options[1] = new Option(1, 1);
					}
				} else {
					sel_start_term.options[1] = new Option(1, 1);
					sel_start_term.options[2] = new Option(2, 2);
				}

			})
			$("#end_year").change(function() {

				var sel_end_year = document.getElementById("end_year");

				//设定开始学期与结束学期的值
				//先获取终止学年的值
				var end_year_value = $("#end_year").val().split("-")[0];

				//获取标签
				var sel_end_term = document.getElementById("end_term");

				$("#end_term").empty();
				sel_end_term.options[0] = new Option("", "");
				if((parseInt(end_year_value) + 1 == year)) {
					//开始学年为去年，则依据月份来定可选学期

					if(month >= 6) {
						//可以有第二个学期
						sel_end_term.options[1] = new Option(1, 1);
						sel_end_term.options[2] = new Option(2, 2);
					} else {
						//不可以有第二个学期
						sel_end_term.options[1] = new Option(1, 1);

					}
				} else {
					sel_end_term.options[1] = new Option(1, 1);
					sel_end_term.options[2] = new Option(2, 2);
				}
			})

			//当开始学年与结束学年相同时，结束学期必须大于等于开始学期
			//to do
		</script>

		<!--各个学期的补考人次-->
		<script type="text/javascript">
			// 基于准备好的dom，初始化echarts图表
			var ch_make_up = echarts.init(document.getElementById('ch_make_up'));

			var option_make_up = {
				title: {
					text: '各个学期的补考人次',
					textStyle: {
						color: 'black',
						fontFamily: 'Microsoft YaHei'
					},
					subtextStyle: {
						color: 'black',
						fontFamily: 'Microsoft YaHei'
					},
				},
				tooltip: {
					trigger: 'axis'
				},
				legend: {
					data: ['人次']
				},
				toolbox: {
					show: true,
					feature: {
						mark: {
							show: true
						},
						dataView: {
							show: true,
							readOnly: false
						},
						magicType: {
							show: true,
							type: ['line', 'bar']
						},
						restore: {
							show: true
						},
						saveAsImage: {
							show: true
						}
					}
				},
				calculable: true,
				xAxis: [{
					type: 'category',
					boundaryGap: false,
					//data : ['大一上','大一下','大二上','大二下','大三上','大三下','大四上','大四下']
				}],
				yAxis: [{
					type: 'value',
					axisLabel: {
						formatter: '{value}'
					}
				}],
				series: [{
					name: '人次',
					type: 'line',
					//data:[3.2, 3.2, 3.8, 4.0, 3.7, 3.3, 3.7,3.2],
					barWidth: 80,
					itemStyle: {
						normal: {
							label: {
								show: true,
								position: 'top',
								textStyle: {
									color: 'black',
									fontSize: 16
								}

							}
						}
					}

				}]
			};

			//ajax请求数据
			$(function() {
				$("#query").click(function() {

					$.ajax({
						type: "post",
						url: "/score/getMakeUpTimes.do",
						dataType: "json",
						data: {
							"start_term": $("#start_year").val() + "-" + $("#start_term").val(),
							"end_term": $("#end_year").val() + "-" + $("#end_term").val()
						},

						success: function(data) {
							var xaxis = [];
							var times = [];
							for(var i in data) {
								xaxis.push(i);
								times.push(data[i]);
							}

							// 为echarts对象加载数据 
							option_make_up.xAxis[0].data = xaxis;
							option_make_up.series[0].data = times;
							ch_make_up.setOption(option_make_up, true);
						},
						error: function(err) {
							alert("发生错误");
						}

					});
				});
			});
			//图表大小自适应
			window.addEventListener("resize", function() {
				ch_make_up.resize();
			});
		</script>

		<!--各个学期的重修人次-->
		<script type="text/javascript">
			// 基于准备好的dom，初始化echarts图表
			var ch_rebuild = echarts.init(document.getElementById('ch_rebuild'));

			var option_rebuild = {
				title: {
					text: '各个学期的重修人次',
					textStyle: {
						color: 'black',
						fontFamily: 'Microsoft YaHei'
					},
					subtextStyle: {
						color: 'black',
						fontFamily: 'Microsoft YaHei'
					},
				},
				tooltip: {
					trigger: 'axis'
				},
				legend: {
					data: ['人次']
				},
				toolbox: {
					show: true,
					feature: {
						mark: {
							show: true
						},
						dataView: {
							show: true,
							readOnly: false
						},
						magicType: {
							show: true,
							type: ['line', 'bar']
						},
						restore: {
							show: true
						},
						saveAsImage: {
							show: true
						}
					}
				},
				calculable: true,
				xAxis: [{
					type: 'category',
					boundaryGap: false,
					//data : ['大一上','大一下','大二上','大二下','大三上','大三下','大四上','大四下']
				}],
				yAxis: [{
					type: 'value',
					axisLabel: {
						formatter: '{value}'
					}
				}],
				series: [{
					name: '人次',
					type: 'line',
					//data:[3.2, 3.2, 3.8, 4.0, 3.7, 3.3, 3.7,3.2],
					barWidth: 80,
					itemStyle: {
						normal: {
							label: {
								show: true,
								position: 'top',
								textStyle: {
									color: 'black',
									fontSize: 16
								}

							}
						}
					}

				}]
			};

			//ajax请求数据
			$(function() {
				$("#query").click(function() {

					$.ajax({
						type: "post",
						url: "/score/getReBuildTimes.do",
						dataType: "json",
						data: {
							"start_term": $("#start_year").val() + "-" + $("#start_term").val(),
							"end_term": $("#end_year").val() + "-" + $("#end_term").val()
						},

						success: function(data) {
							var xaxis = [];
							var times = [];
							for(var i in data) {
								xaxis.push(i);
								times.push(data[i]);
							}

							// 为echarts对象加载数据 
							option_rebuild.xAxis[0].data = xaxis;
							option_rebuild.series[0].data = times;
							ch_rebuild.setOption(option_rebuild, true);
						},
						error: function(err) {
							alert("发生错误");
						}

					});
				});
			});
			//图表大小自适应
			window.addEventListener("resize", function() {
				ch_rebuild.resize();
			});
		</script>

	</body>

</html>